import Vue from "vue";
import VueRouter from "vue-router";
// 一级嵌套
import UiRouter from "@/views/UiRouter.vue";
import ConTacts from "@/views/ConTacts.vue";
import AbouT from "@/views/AbouT.vue";
// 二级嵌套
import AllContacts from "@/views/AllContacts.vue";
import AliceVue from "@/views/AliceVue.vue";
import BobVue from "@/views/BobVue.vue";
// 三级目录
import BobBiog from "@/views/BobBiog.vue";
import BobFax from "@/views/BobFax.vue";
Vue.use(VueRouter);
const router = new VueRouter({
  // 配置路由
  routes: [
    { path: "/uirouter", component: UiRouter },
    {
      path: "/contacts",
      component: ConTacts,
      children: [
        {
          path: "/allcontacts",
          component: AllContacts,
        },
        {
          path: "/alicevue",
          component: AliceVue,
        },
        {
          path: "/bobvue",
          component: BobVue,
          children: [
            { path: "/bobbiog", component: BobBiog },
            { path: "/bobfax", component: BobFax },
          ],
        },
      ],
    },
    { path: "/about", component: AbouT },
  ],
});

export default router;
